package com.setup.trac.pojo.comparator;

import java.util.Comparator;

import com.setup.trac.pojo.StoricoTicket;

public class StoricoTicketOrderByDataModifica implements Comparator<StoricoTicket>,OrderBy {

	private int orderByType;
	
	
	
	public StoricoTicketOrderByDataModifica(int orderByType) {
		super();
		this.orderByType = orderByType;
	}



	public int compare(StoricoTicket o1, StoricoTicket o2) {
		if(o1!=null && o2!=null){
			return o1.getDataModifica().compareTo(o2.getDataModifica())*orderByType;
		}
		return 0;
	}

}
